<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <div>{{msg}}</div>
        <div>{{num}}</div>
        <div>
            <button v-on:click='num++'>点击</button>
            <button @click='num++'>点击1</button>
            <button @click='handle'>点击2</button>
        </div>
        <div>
            <input type="text" v-model='msg' />
        </div>
    </div>
    <script type="text/javascript" src="../vue.js"></script>
    <script type="text/javascript">
        var vm = new Vue({
            el: '#app',
            data: {
                msg: 'hello vue',
                info: 'saad',
                num: 0
            },
            methods: {
                handle: function() {
                    this.num++;
                }
            }
        });
    </script>

</body>

</html>